<?php
/*
|--------------------------------------------------------------------------
| Web Routes: Namespace Project
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

use Illuminate\Contracts\Routing\Registrar as RouteRegisterContract;
Route::domain('project.'.env('APP_DOMAIN'))->namespace('Project')->group(function (RouteRegisterContract $route) {
    $route->middleware('normal')->group(function (RouteRegisterContract $route) {
        $route->get('/', 'IndexController@index')->name('project/info');

        $route->get('/{project}/{category}/{api}', 'IndexController@api')->name('project/api');

        // $route->get('/{project}/{category}', 'IndexController@category');

        $route->get('/{project}', 'IndexController@project')->where('project', '\d+')->name('project/project');

        $route->get('/{project}/common', 'IndexController@common')->where('project', '\d+')->name('project/common');

        $route->get('/{project}/overview', 'IndexController@overview')->where('project', '\d+')->name('project/overview');

        $route->get('/{project}/history', 'IndexController@history')->where('project', '\d+')->name('project/history');
    });

    // Route::middleware('project.auth')->group(function() {
    //     Route::get('/{project}', 'IndexController@Index')->name('project/index');
    // });
});